package com.fuershiye.woman.monitor.service;

import java.util.List;

import com.fuershiye.woman.monitor.beans.IdName;
import com.fuershiye.woman.monitor.beans.IdNamePid;
import com.fuershiye.woman.monitor.beans.Page;
import com.fuershiye.woman.monitor.model.Area;

/**
 * @author yongyongdong
 *
 */
public interface AreaService {

    public void save(Area it);
    
    public Area get(Long id);
    
    /**	取当前表中最大数据
     * @return
     */
    public Area getTop();
    
    /**
     * @param sort(当前位置)
     * @param aim	方向 (1:比id大的;	2:比id小的)
     * @param count	取几条数据
     * @return
     */
    public Area findBySort(Long sort, Integer aim, Integer count);

    /**
     * name为空查询所有,不为空模糊查询
     * @return
     */
    public List<Area> list(String name, Long pid, Integer level, Integer status, Page page);
    
    public int getTotal(String name, Long pid, Integer level, Integer status);
    
    /**
     * 获取所有的类型(id和名称)
     * 
     * @return
     */
    public List<IdNamePid> getAllNames();
    
	public List<IdNamePid> getByLevelAndPid(Integer level, Long pid);
	
	public List<IdName> getIdNameByLevelAndPid(Integer level, Long pid);

    public List<IdName> listByLevel(Integer level, Integer status);
	
    public Area findByCode(String code);
    
}
